//package ylsb.service;
//
//
//import org.springframework.stereotype.Service;
//import ylsb.dao.Hc2Mapper;
//import ylsb.model.Hc2;
//import ylsb.model.Hc2Example;
//import ylsb.model.Yiyonghaocai;
//import ylsb.model.YiyonghaocaiExample;
//
//import javax.annotation.Resource;
//import java.util.List;
//import java.util.Map;
//
//@Service
//public class Hc2Service {
//
//    @Resource
//    Hc2Mapper ddMapper;
//
//    public boolean isexistByxiangmuId(String xiangmuId){
//        Hc2Example mmExample=new Hc2Example();
//        Hc2Example.Criteria criteria=mmExample.createCriteria();
//        criteria.andXiangmuidEqualTo(xiangmuId);
//        return  ddMapper.selectByExample(mmExample).size()>0;
//    }
//
//    public boolean add (Hc2 hc2){
//        return ddMapper.insert(hc2)==1;
//    }
//
//    public List<Map<String, Object>> findPinzhongAll(String ppxiangmuId,int ppPageIndex, int ppPageSize){
//        int mmStartIndex = (ppPageIndex - 1) * ppPageSize;
//        return ddMapper.findPinzhongAll(ppxiangmuId,mmStartIndex,ppPageSize);
//    }
//
//    public List<Map<String, Object>> findPinpaiByPinzhong(String ppxiangmuId,String mmPinzhongOne){
//        return ddMapper.findPinpaiByPinzhong(ppxiangmuId,mmPinzhongOne);
//    }
//    public List<Map<String, Object>> findPinpaiFenlei(String ppxiangmuId,String mmPinzhongOne){
//        return ddMapper.findPinpaiFenlei(ppxiangmuId,mmPinzhongOne);
//    }
//
//    public List<Map<String, Object>> findXinghaoByPinpai(String ppxiangmuId,String ppPinzhong,String ppPinpai){
//        return ddMapper.findXinghaoByPinpai(ppxiangmuId,ppPinzhong,ppPinpai);
//    }
//    public List<Map<String, Object>> findPinpaiResultByPinzhong(String ppxiangmuId,String ppuserId,String mmPinzhongOne){
//        return ddMapper.findPinpaiResultByPinzhong(ppxiangmuId,ppuserId,mmPinzhongOne);
//    }
//    public Integer getYiyonghaocailist(String ppxiangmuId,int ppPageIndex, int ppPageSize) {
//        Object mmCount = ddMapper.getYiyonghaocailist(ppxiangmuId,ppPageIndex,ppPageSize);
//        return mmCount == null ? 0 : Integer.parseInt(mmCount.toString());
//    }
//    public boolean deleteByxiangmuId(String xiangmuId){
//        YiyonghaocaiExample mmExample=new YiyonghaocaiExample();
//        YiyonghaocaiExample.Criteria criteria=mmExample.createCriteria();
//        criteria.andXiangmuidEqualTo(xiangmuId);
//        return  ddMapper.deleteByExample(mmExample)>=0;
//    }
//    public Yiyonghaocai findOne(String id){
//        return ddMapper.selectByPrimaryKey(id);
//    }
//    public Integer getVoteCount(String ppxiangmuId){
//        List<Map<String, Object>> list=ddMapper.findPinzhongAndPinpaiByXiangmuId(ppxiangmuId);
//        return list == null ? 0 : list.size();
//    }
//    public List<Map<String, Object>> findDaochuPinzhongAll(String ppxiangmuId){
//        return ddMapper.findDaochuPinzhongAll(ppxiangmuId);
//    }
//    public List<Map<String, Object>> findResultGuochanBypinzhong(String ppxiangmuId, String ppuserId,String ppPinzhong){
//        return ddMapper.findResultGuochanBypinzhong(ppxiangmuId,ppuserId,ppPinzhong);
//    }
//    public List<Map<String, Object>> findZuanjiBypinzhong(String ppxiangmuId,String ppPinzhong,String ppPinpai){
//        return ddMapper.findZuanjiBypinzhong(ppxiangmuId,ppPinzhong,ppPinpai);
//    }
//    public List<Map<String, Object>> findGuochanBypinzhong(String ppxiangmuId,String ppPinzhong){
//        return ddMapper.findGuochanBypinzhong(ppxiangmuId,ppPinzhong);
//    }
//    public List<Map<String, Object>> findGuochanBypinzhongAndpinpai(String ppxiangmuId,String ppPinzhong,String ppPinpai){
//        return ddMapper.findGuochanBypinzhongAndpinpai(ppxiangmuId,ppPinzhong,ppPinpai);
//    }
//    public List<Map<String, Object>> findyibaoBypinzhongAndpinpai(String ppxiangmuId,String ppPinzhong,String ppPinpai){
//        return ddMapper.findyibaoBypinzhongAndpinpai(ppxiangmuId,ppPinzhong,ppPinpai);
//    }
//    public List<Map<String, Object>> findXinghaoJieguoByPinpai(String ppPinzhong,String ppPinpai,String ppxiangmuId, String ppuserId){
//        return ddMapper.findXinghaoJieguoByPinpai(ppPinzhong,ppPinpai,ppxiangmuId,ppuserId);
//    }
//
//
//
//}
